Function: getElement(stringIDOrCSSSelector, domElementContext, functionCallback(domElement)) Shorthand: get(stringIDOrCSSSelector, domElementContext, functionCallback(domElement)) Description: Fetches a specified DOM element. Returns: Matching domElement, or $A object if chained. Note: The getElement() function will return the element with the matching id, or the first matching element when referenced using a CSS selector. Example: // Fetch a DOM element with the specified ID. var myElement = $A.getElement("unique-element-id"); // Fetch a DOM element with the specified ID then run a callback. var myElement = $A.getElement("unique-element-id", function(domElement) { // Do something. }); // Fetch a DOM element with the specified ID in a different context then run a callback. var myElement = $A.getElement("unique-element-id", top.document, function(domElement) { // Do something. }); // Or the same using chaining // Fetch a DOM element with the specified ID. var myChain = $A("#unique-element-id"); // Fetch a DOM element with the specified ID then run a callback. var myChain = $A(document).getElement("unique-element-id", function(domElement) { // Do something. }); // Fetch a DOM element with the specified ID in a different context then run a callback. var myChain = $A(top.document).getElement("unique-element-id", function(domElement) { // Do something. }); // To return the modified element within a chain, use the "return()" method. var myElement = myChain.return();